package org.apache.http.entity.mime.content;

import java.util.Collections;
import java.util.Map;
import org.apache.james.mime4j.message.AbstractBody;

public abstract class AbstractContentBody extends AbstractBody
  implements ContentBody
{
  private final String mediaType;
  private final String mimeType;
  private final String subType;

  public AbstractContentBody(String paramString)
  {
    if (paramString == null)
      throw new IllegalArgumentException("MIME type may not be null");
    this.mimeType = paramString;
    int i = paramString.indexOf(47);
    if (i != -1)
    {
      this.mediaType = paramString.substring(0, i);
      this.subType = paramString.substring(i + 1);
    }
    while (true)
    {
      return;
      this.mediaType = paramString;
      this.subType = null;
    }
  }

  public Map<?, ?> getContentTypeParameters()
  {
    return Collections.EMPTY_MAP;
  }

  public String getMediaType()
  {
    return this.mediaType;
  }

  public String getMimeType()
  {
    return this.mimeType;
  }

  public String getSubType()
  {
    return this.subType;
  }
}